# 创建类
class Clock:
    id = None
    price = None

    def ring(self):
        import winsound
        """
            能让电脑发出一些响声的内置方法
            2000：频率
            3000：响铃的时间
        """
        winsound.Beep(2000, 3000)

# 创建对象
clock = Clock()
clock.id = '123456'
clock.price = 3000
clock.ring()